package com.example.seckill.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

/**
 * @program: seckill
 * @description: 公共返回对象枚举
 * @author: KingCrimson
 * @create: 2022-08-06 20:39
 **/

@Getter
@ToString
@AllArgsConstructor
public enum RespBeanEnum {

    //通用
    SUCCESS(200,"SUCCESS"),
    ERROR(500,"服务端异常"),

    //登录模块
    LOGIN_ERROR(500210,"用户名或密码不正确"),
    MOBILE_ERROR(500211,"手机号码不正确"),
    BIND_ERROR(500212,"参数校验异常"),
    SESSION_ERROR(500213,"没有登录或用户不存在"),

    //秒杀模块
    EMPTY_STOCK(500500,"空库存！"),
    REPEATE_ERROR(500501,"该商品每人限购一件!"),

    //订单模块
    ORDER_NOT_EXIST(500300,"订单信息不存在");
    private final Integer code;
    private final String message;

}
